// Copyright (c) 2008,
// Marc Speck, http://www.faindu.com
// All Rights Reserved. The following is Source Code and is subject to all restrictions 
// on such code as contained in the license accompanying this product.
package com.faindu.editImage.manipulations
{

/**
 * Interface for Image Manipulations Tool.
 */
public interface IImageManipulations
{
	/**
	 * This stores the state of the image. <code>imageEdits</code> is a serialized 
	 * form of all manipulations applied to the image. You can also set the image 
	 * to a saved state.
	 * 
	 * @example The following XML shows the result of a translated, rotated, croped and scaled image:  
	 * <listing version="3.0" >&lt;imageedit&gt;
	 *    &lt;matrix a="0.7071067811865476" b="0.7071067811865475" c="-0.7071067811865475" d="0.7071067811865476" tx="115.61269837220809" ty="-22.113744392734617"/&gt;
	 * 	  &lt;cutout x="0" y="0" width="169" height="257"/&gt;
	 * &lt;/imageedit&gt;</listing>
	 * 
	 * @example The following XML shows the result of a none-edited image. Note that no element
	 * "cutout" is returned.  
	 * <listing version="3.0" >&lt;imageedit&gt;
	 *    &lt;matrix a="1" b="0" c="0" d="1" tx="0" ty="0"/&gt;
	 * &lt;/imageedit&gt; </listing>
	 */		
	function get imageEdits(): XML
	function set imageEdits( edits:XML ): void
	
	/**
	 * Resets the image to the last setting injected into
	 * <code>imageEdits</code>. If <code>imageEdits</code> has never 
	 * been set, nothing happens.
	 * 
	 * @see #imageEdits
	 * @see #resetToDefaults()
	 */	
	function reset(): void

	/**
	 * Resets the matrix and the cutout window to the default values. It assignes
	 * the default values to <code>imageEdits</code> and hence, it does influence 
	 * <code>reset</code>.
	 * 
	 * @see #imageEdits 
	 * @see #reset()
	 */	
	function resetToDefaults(): void
	
	/**
	 * Disables all tools including the outline tool.
	 */
	function disableAllTools(): void
}
}
